<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="m@markzou.com">
    <link rel="shortcut icon" href="favicon.png">
    <title>${(jshopbasicinfo.jshopname)} - 商城首页</title>

    <!-- fav icons -->
    <link rel="shortcut icon" href="${basepath}/ui/assets/img/favicon.png" />

    <link rel="stylesheet" type="text/css" href="${basepath}/ui/assets/css/inc_default_theme.css">
    <link rel="stylesheet" type="text/css" href="${basepath}/ui/assets/css/bootstrap.css">
    <link rel="stylesheet" href="${basepath}/admin/js/plugins/uploader/fileuploader.css" >
     <link rel="stylesheet" href="${basepath}/ui/js/jquery.Jcrop.min.css" >
    <script src="${basepath}/ui/assets/js/PCASClass.js"></script>
    <script src="${basepath}/ui/assets/js/bootstrap.min.js"></script>
    <script src="${basepath}/ui/assets/js/jquery-1.9.0.min.js"></script>

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="${basepath}/ui/assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respipond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="${basepath}/ui/assets/js/html5shiv.js"></script>
      <script src="${basepath}/ui/assets/js/respond.min.js"></script>
    <![endif]-->


</head>

<body>

<div class="container-fluid nopadding">

    <div class="page_content_ucpage">

        <div class="pc_head">

            <!-- 头部开始 -->
            <#include "/WEB-INF/theme/default/shop/header.ftl">
            <!--导航条-->
            <#include "/WEB-INF/theme/default/shop/mainnavigation.ftl">

        
        </div>
            <div class="pc_body user_center_body">
            <div class="pc_w1200">

                <div class="row">
                    <div class="col-md-3">
                        <div class="ucleft">
                            <div class="user_main">
                                <div class="userimg"><img width= "80px" hight="80px" src="${basepath}/${member.headpath}" alt=""></div>
                                <div class="user_info">
                                    <span>${member.nick}</span>
                                    注册时间：${member.createtime?string("yyyy-MM-dd")}</br>
                                    <a href="${basepath}/memberlogout.action">[注销]</a>
                                </div>

                            </div>

                            <ul class="user_nav">
                                <li>
                                    <a href="${basepath}/mcenter/gomyorderlist.action" class="un_01">
                                        <span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>
                                        订单管理
                                    </a>
                                </li>
                                <li>
                                    <a href="${basepath}/mcenter/goreturngoods.action" class="un_02">
                                        <span class="glyphicon glyphicon-leaf" aria-hidden="true"></span>
                                        售后服务
                                    </a>
                                </li>
                                <li>
                                    <a href="${basepath}/gomemberinfo.action" class="un_03">
                                        <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
                                        账户资料
                                    </a>
                                </li>
                                <li>
                                  <a href="${basepath}/mcenter/goaddressmanage.action" class="un_04 current">
                                        <span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>
                                        收货地址
                                    </a>
                                </li>
                            </ul>
                        </div>

                    </div>
                     <div class="col-md-9">
                        <div class="ucright">

                            <div class="om_m">
                                <div class="p_tt">
                                    <div class="bot"><button class="btn btn-default" type="submit" type="submit" data-toggle="collapse" data-target="#collapseExamplenew" aria-expanded="false" aria-controls="collapseExamplenew">添加新地址</button></div>
                                    收货地址
                                </div>

                                <div class="collapse" id="collapseExamplenew" style="clear: both; overflow: hidden; margin: 0px 20px 20px 20px !important;">
                                    <div class="alert alert-warning alert-dismissible fade in" role="alert" style=" margin-bottom: 0px !important; overflow: hidden;">
                                        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                        <div class="form-group">
                                            <label style="padding-bottom: 10px;">请输入详细地址</label>
                                            <div style="display: block; width: 100%; clear: both">
                                            <span style="float: left; width: 150px; padding-right: 10px;">
                                                <select id="provincenew" name="provincenew" class="form-control"></select>
                                            </span>
                                            <span style="float: left; width: 150px; padding-right: 10px;">
                                                <select id="citynew" name="citynew"class="form-control"></select>
                                            </span>
                                            <span style="float: left; width: 150px; padding-right: 10px;">
                                                <select  id="areanew" name="areanew"class="form-control"></select>
                                            </span>
                                            </div>
                                            <div style="display: block; width: 100%; padding-top: 13px; clear: both; ">
                                                <input type="text" class="form-control" id="streetnew" placeholder="">
                                            </div>
                                        </div>
                                        <div class="form-group" style="display: block; width: 10%; float: left;">
                                            <label class="control-label">收货人</label>
                                            <input id="shippingusername" type="text" class="form-control" placeholder="">
                                        </div>
                                        <div class="form-group" style="display: block; width: 30%; float: left; margin-left: 20px;">
                                            <label class="control-label">手机</label>
                                            <input id="mobile" type="text" class="form-control" placeholder="">
                                        </div>
                                        <div class="form-group" style="display: block; width: 10%; float: left; margin-left: 20px; clear: right">
                                            <label class="control-label">邮编</label>
                                            <input id="postcode" type="text" class="form-control" placeholder="">
                                        </div>
                                        <div class="form-group" style="display: block; width: 20%; margin-left: 20px; float: right">
                                            <label class="control-label">给地址取个名称</label>
                                            <input id="addresstag" type="text" class="form-control" placeholder="">
                                        </div>
                                        <div class="form-group" style="display: block;  float: left; clear: both">
                                            <button type="button" onclick="addnewaddress('${basepath}')" class="btn btn-default">增加</button>
                                        </div>
                                    </div>
                                </div>
                             

                                <ul class="om_list">

                                        <#if (deliveraddressList??) && (deliveraddressList?size>0)> 
                                            <#list deliveraddressList as address>
                                                <li>
                                                <table class="qladd">
                                                    <tr>
                                                        <td>
                                                            详细地址
                                                            <br/>
                                                            <span class="qladdinfo">${address.province}${address.city}${address.district}${address.street}</span>
                                                        </td>
                                                        <td class="">
                                                            收货人
                                                            <br/>
                                                            <span class="qladdinfo">${address.shippingusername}</span>
                                                        </td>
                                                        <td class="">
                                                            手机
                                                            <br/>
                                                            <span class="qladdinfo">${address.mobile}</span>
                                                        </td>
                                                        <td class="">
                                                            邮编
                                                            <br/>
                                                            <span class="qladdinfo">${address.postcode}</span>
                                                        </td>
                                                        <td class="addbot">
                                                            <button class="btn btn-default" type="submit" data-toggle="collapse" data-target="#collapseExample${address_index}" aria-expanded="false" aria-controls="collapseExample${address_index}"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span></button>
                                                        </td>
                                                        <td class="addbot">
                                                            <button class="btn btn-danger" type="button" onclick="deladdressById('${basepath}','${address.addressid}')"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
                                                        </td>
                                                    </tr>
                                                </table>
                                        <div class="collapse" id="collapseExample${address_index}" style="clear: both; overflow: hidden; margin: 20px 0 0px 0 !important;">
                                            <div class="alert alert-warning alert-dismissible fade in" role="alert" style=" margin-bottom: 0px !important; overflow: hidden;">
                                                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                                                <div class="form-group">
                                                    <label style="padding-bottom: 10px;">请输入详细地址</label>
                                                    <div style="display: block; width: 100%; clear: both">
                                            <span style="float: left; width: 150px; padding-right: 10px;">
                                                <select id="province${address_index}" name="province${address_index}" class="form-control">
                                                </select>
                                            </span>
                                            <span style="float: left; width: 150px; padding-right: 10px;">
                                                <select id="city${address_index}" name="city${address_index}"class="form-control">
                                                </select>
                                            </span>
                                            <span style="float: left; width: 150px; padding-right: 10px;">
                                                <select id="area${address_index}" name="area${address_index}"class="form-control">
                                                </select>
                                            </span>
                                                    </div>
                                                    <div style="display: block; width: 100%; padding-top: 13px; clear: both; ">
                                                        <input type="text" class="form-control" id="street${address_index}" value="${address.street}" placeholder="">
                                                    </div>
                                                </div>
                                                <div class="form-group" style="display: block; width: 10%; float: left;">
                                                    <label class="control-label">收货人</label>
                                                    <input id="shippingusername${address_index}" type="text" class="form-control" value="${address.shippingusername}" placeholder="">
                                                </div>
                                                <div class="form-group" style="display: block; width: 30%; float: left; margin-left: 20px;">
                                                    <label class="control-label">手机</label>
                                                    <input id="mobile${address_index}" type="text" class="form-control" value="${address.mobile}" placeholder="">
                                                </div>
                                                <div class="form-group" style="display: block; width: 10%; float: left; margin-left: 20px; clear: right">
                                                    <label class="control-label">邮编</label>
                                                    <input id="postcode${address_index}" type="text" class="form-control" value="${address.postcode}" placeholder="">
                                                </div>
                                                <div class="form-group" style="display: block; width: 20%; margin-left: 20px; float: right">
                                                    <label class="control-label">给地址取个名称</label>
                                                    <input id="addresstag${address_index}" type="text" class="form-control" value="${address.addresstag}" placeholder="">
                                                </div>

                                                <div class="form-group" style="display: block;  float: left; clear: both">
                                                    <button type="submit" class="btn btn-default" onclick="updateAddressById('${basepath}','${address_index}','${address.addressid}')">修改</button>
                                                </div>
                                            </div>
                                        </div>
                                    </li>
                                    <script language="javascript" defer> new PCAS("province${address_index}","city${address_index}","area${address_index}","上海市","市辖区","黄浦区");</script>
                                      </#list> 
                                </#if>











                                </ul>
                            </div>


                            <div class="pc_mod2">
                                <!--<div class="yahoo2">
                                    <span class="disabled">共21页</span>
                                    <a href="#" class="prev">&lt; 上一页</a>
                                    <span class="current">1</span><a href="#">2</a><a href="#">3</a><a href="#">4</a><a href="#">5</a><a href="#">6</a><a href="#">7</a> ... <a href="#">199</a><a href="#">200</a><a href="#" class="next">下一页 &gt;</a>
                                </div>
                                -->
                            </div>

                        </div>
                    </div>
                </div>


            </div>
        </div>
        <#include "/WEB-INF/theme/default/shop/footer.ftl">
        </div>

    </div>

</div>

<script src="${basepath}/ui/assets/js/holder.js"></script>
<script src="${basepath}/ui/assets/js/alert.js"></script>
<script src="${basepath}/ui/assets/js/collapse.js"></script>
<script type="text/javascript" src="${basepath}/ui/assets/js/ks-switch.js"></script>
<script type="text/javascript" src="${basepath}/ui/assets/js/jquery-imgslideshow.js"></script>
<script type="text/javascript">
    var timeout = 500;
    var closetimer  = 0;
    var ddmenuitem  = 0;

    $(document).ready(function(){
        $('.cat_item').mousemove(function(){
            $(this).addClass('cat_item_on');
        });
        $('.cat_item').mouseleave(function(){
            $(this).removeClass('cat_item_on');
        });
        $('#slideshow').imgSlideShow({itemclass: 'i'})
        $("#slide-qg").switchTab({titCell: "dt a", trigger: "mouseover", delayTime: 0});
        $("#s_cart_nums1").hover(function(){
            mcancelclosetime();
            if(ddmenuitem) ddmenuitem.hide();
            ddmenuitem = $(document).find("#s_cartbox");
            ddmenuitem.fadeIn();
        },function(){
            mclosetime();
        });
        $("#s_cart_nums2").hover(function(){
            mcancelclosetime();
            if(ddmenuitem) ddmenuitem.hide();
            ddmenuitem = $(document).find("#s_cartbox");
            ddmenuitem.fadeIn();
        },function(){
            mclosetime();
        });
        $("#s_cartbox").hover(function(){
            mcancelclosetime();
        },function(){
            mclosetime();
        });
        var $cur = 1;
        var $i = 4;
        var $len = $('.hot_list>ul>li').length;
        var $pages = Math.ceil($len / $i);
        var $w = $('.hotp').width()-66;

        var $showbox = $('.hot_list');

        var $pre = $('div.left_icon');
        var $next = $('div.rgt_icon');

        $pre.click(function(){
            if (!$showbox.is(':animated')) {
                if ($cur == 1) {
                    $showbox.animate({
                        left: '-=' + $w * ($pages - 1)
                    }, 500);
                    $cur = $pages;
                }
                else {
                    $showbox.animate({
                        left: '+=' + $w
                    }, 500);
                    $cur--;
                }

            }
        });

        $next.click(function(){
            if (!$showbox.is(':animated')) {
                if ($cur == $pages) {
                    $showbox.animate({
                        left: 0
                    }, 500);
                    $cur = 1;
                }
                else {
                    $showbox.animate({
                        left: '-=' + $w
                    }, 500);
                    $cur++;
                }

            }
        });

    });
    function mclose()
    {
        if(ddmenuitem) ddmenuitem.hide();
    }
    function mclosetime()
    {
        closetimer = window.setTimeout(mclose, timeout);
    }
    function mcancelclosetime()
    {
        if(closetimer)
        {
            window.clearTimeout(closetimer);
            closetimer = null;
        }
    }
</script>


<script language="javascript" defer>
    new PCAS("provincenew","citynew","areanew","上海市","市辖区","黄浦区");
</script>
<script type="text/javascript" src="${basepath}/ui/js/deliveraddress.js"></script>
</body>
</html>
